@Midway.MidwayModule({
    code: "Button",
    template: require('./view.html')
})
class ButtonModule extends CommonClass {
    constructor() {
        super();
    }

    $launch() {
        console.log("this is message from button");
        /*$(this.View).on('click', function () {
            console.log('message from confirm button');
        });*/
        const self = this;
        const btnConfirm = this.View.querySelector('.js_confirm');
        const btnCancel = this.View.querySelector('.js_cancel');
        btnConfirm.addEventListener('click', function () {
            self.dispatchEvent('ConfirmClick',
                ConstVariable.PresenterEventType.IC_PLAYER_EVENT,
                {Hello: "Say Hello!"});
            console.log('message from confirm button');
        }, false);
        btnCancel.addEventListener('click', function () {
            self.dispatchEvent('CancelClick',
                ConstVariable.PresenterEventType.IC_PLAYER_EVENT,
                {Hello: "Say Cancel!!"},
                ConstVariable.PresenterEventScope.Global);
        }, false);
    }
}